


*** BEFORE RUNNING THIS CODE, PLEASE REFER TO THE FILE READ_ME FIRST


                                 ***************************************************************************
                                 **** Runnning the tables and figures reported in the main text ************
                                 ***************************************************************************

								 
** Please use the #sortseed to produce numerically equivalent results for computations whose results may change slightly when the computations are run repeatedly.

set sortseed 0987654321								 
								 
								 
*********************
** Table 1: main tex
*********************

** Correlation between the number of evangelical churches per 100,000 inhabitants and a set of electoral outcomes (1994-2018)
** Fixed-effects models 

*** To replicate estimates reported in Table 1 (main text), use the file "df_LPT_igrejas_outcomes.dta"
use "df_LPT_igrejas_outcomes.dta"

** Before running the OLS models, you should run the code below to create key variables used in the statistical analysis

*************************************************************************
**** Transforming/creating key variables used in the statistical analysis
*************************************************************************

*** creating the log of the size of population
gen ln_pop = ln(pop)
** creating the log of the size of electorate
gen ln_elec = ln(qtde_eleitores)

  
** Municipal and year-level fixed effects models (FE)

*** Full sample (All)
xtset ibge7 year
** Outcome: Turnout
xtreg turnout all_100 idhm ln_pop ln_elec, fe cluster (cod_uf) 
** Outcome: Competition
xtreg comp all_100 idhm ln_pop ln_elec, fe cluster (cod_uf)
** Outcome: Conservatism
xtreg ideo_imp all_100 idhm ln_pop ln_elec, fe cluster (cod_uf)
** Outcome: Polarization
xtreg pol_pi all_100 idhm ln_pop ln_elec, fe cluster (cod_uf)

    
*** National elections
** Outcome: Turnout
xtreg turnout all_100 idhm ln_pop ln_elec if national ==1, fe cluster (cod_uf)
** Outcome: Competition
xtreg comp all_100 idhm ln_pop ln_elec if national ==1, fe cluster (cod_uf)
** Outcome: Conservatism
xtreg ideo_imp all_100 idhm ln_pop ln_elec if national ==1, fe cluster (cod_uf)
** Outcome: Polarization
xtreg pol_pi all_100 idhm ln_pop ln_elec if national ==1, fe cluster (cod_uf)

    
*** Local elections
** Outcome: Turnout
xtreg turnout all_100 idhm ln_pop if national ==0, fe cluster (cod_uf)
** Outcome: Competition
xtreg comp all_100 idhm ln_pop if national ==0, fe cluster (cod_uf)
** Outcome: Conservatism
xtreg ideo_imp all_100 idhm ln_pop if national ==0, fe cluster (cod_uf)
** Outcome: Polarization
xtreg pol_pi all_100 idhm ln_pop if national ==0, fe cluster (cod_uf)




***********************
*** Table 2: main text
***********************

** The impact of evangelical churches on electoral politics (2004-2018)


*** To replicate estimates reported in Table 2 (main text), use the file "df_LPT_igrejas_outcomes.dta"

use "df_LPT_igrejas_outcomes.dta"
 
*** Fuzzy regression discontinuity models (USING a linear FIT)


** Running these estimates requires the STATA package rdrobust. If you haven't yet, you can install this package by using the line code below: 
    * net install rdrobust, from(https://raw.githubusercontent.com/rdpackages/rdrobust/master/stata) replace
	* Visit https://rdpackages.github.io/rdrobust/ to further information on this package

***** Full sample (All)  
** Outcome: Turnout
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) all
** Outcome: Competition
rdrobust comp margins if year >= 2004, c(0) fuzzy(all_100) all 
** Outcome: Conservatism
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) all
** Outcome: Polarization
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) all


***** National elections 
** Outcome: Turnout
rdrobust turnout margins if year >= 2004 & national ==1, c(0)  fuzzy(all_100) all
** Outcome: Competition
rdrobust comp margins if year >= 2004 & national ==1, c(0) fuzzy(all_100) all
** Outcome: Conservatism
rdrobust ideo_imp margins if year >= 2004 & national ==1, c(0) fuzzy(all_100) all
** Outcome: Polarization
rdrobust pol_pi margins if year >= 2004 & national ==1, c(0) fuzzy(all_100) all


***** Local elections 
** Outcome: Turnout
rdrobust turnout margins if year >= 2004 & national ==0, c(0)  fuzzy(all_100) all
** Outcome: Competition
rdrobust comp margins if year >= 2004 & national ==0, c(0) fuzzy(all_100) all
** Outcome: Conservatism
rdrobust ideo_imp margins if year >= 2004 & national ==0, c(0) fuzzy(all_100) all
** Outcome: Polarization
rdrobust pol_pi margins if year >= 2004 & national ==0, c(0) fuzzy(all_100) all




******************************************************
*** Runnning the RDD Figures reported in main text 
******************************************************

   * Running this plot requires the STATA package rdrobust. If you haven't yet, you can install this package by using the line code below: 
   * net install rdrobust, from(https://raw.githubusercontent.com/rdpackages/rdrobust/master/stata) replace
   * Visit https://rdpackages.github.io/rdrobust/ to further information on this package
	
	
*************************
** Figure 3 - main text
*************************

** RD plot of the first-stage: the number of evangelical churches per 100,000 inhabitants given the value of the running variable – i.e., the percentage of households with electricity in 2000


*** To replicate the results ploted in Figure 3 (main text), use the file "df_LPT_igrejas_outcomes.dta"

use "df_LPT_igrejas_outcomes.dta"


** Setting the work directory where the the figure will be saved 

cd "INSERT DIRECTORY PATH HERE" 
 			
** Linear fit
rdplot all_100 light_00 if year >= 2004 & all_100 < 40, c(85) p(1) level(90) ///
     graph_options(title("") ///
     ytitle("Evangelical churches per 100,000",size(medsmall)) /// 
	 xtitle("% of households with electricity in 2000",size(medsmall)) /// 
	  legend(position(4) cols(1)) ///
	  xline(85, lcolor(red) lpattern(dash) lwidth(medthin))) ///
	   yscale(range(0 20)) ///
	  graphregion(color(white)) bgcolor(white) plotregion(margin(zero)) ///
graph save rdd_first_linear.gph

 									 									  


cd "INSERT DIRECTORY PATH HERE" 
																		  																																																		
** Cubic fit
rdplot all_100 light_00 if year >= 2004 & all_100 < 40, c(85) p(3) level(90) ///
     graph_options(title("") ///
     ytitle("Evangelical churches per 100,000",size(medsmall)) /// 
	 xtitle("% of households with electricity in 2000",size(medsmall)) /// 
	  legend(position(4) cols(1)) ///
	  xline(85, lcolor(red) lpattern(dash) lwidth(medthin))) ///
	  graphregion(color(white)) bgcolor(white) plotregion(margin(zero)) ///
graph save rdd_first_cubic.gph


** Before combining the plots
*** You should make sure to set the correct directory where the gph figures have been saved
cd "INSERT DIRECTORY PATH HERE"  
																		  
graph combine rdd_first_linear.gph rdd_first_cubic.gph, cols(1)
graph save comb_first_stage_linear_cubic.gph 																		  
																		  																									  
*************************
** Figure 4 - main text
*************************
  
  * The predicted share of Christian evangelicals given the per capita number (log) of new connections to the electrical grid through the LPT (2004-2018)
 
** To replicate the results ploted in Figure 4 (main text), please use the following dataset: df_LPT_share_evangs.dta
 
 
use "df_LPT_share_evangs.dta"
 
*************************************************************************
**** Transforming/creating key variables used in the statistical analysis
*************************************************************************

*** creating the log of the size of population
gen ln_pop = ln(pop)
** creating the log of the size of electorate
gen ln_elec = ln(qtde_eleitores)
** creating a dummy variable that identifies whether a given municipality if located at the Northeast region in Brazil
gen ne=.
replace ne = 1 if cod_uf == 21
replace ne = 1 if cod_uf == 22
replace ne = 1 if cod_uf == 23
replace ne = 1 if cod_uf == 24
replace ne = 1 if cod_uf == 25
replace ne = 1 if cod_uf == 26
replace ne = 1 if cod_uf == 27
replace ne = 1 if cod_uf == 28
replace ne = 1 if cod_uf == 29
replace ne = 0 if ne ==.
*** creating the log of LPT connections per 100,000 inhabitants
gen ln_lptconnections100 = ln(conec_100)


** Running OLS models to predict the share of Chistian evangelicals given the log of number of LPT connections per 100,000

reg share_evang ln_lptconnections100 ln_pop IDHM ne, robust
margins, at(ln_lptconnections100=(-4.102(1) 10.99)) post
estimates store m_1
set scheme plotplain
coefplot m_1, title("") ytitle(Estimated share of Christian evangelicals) xtitle("New connections per 100,000 inhabitants (log) to the electrical grid") ///
    at recast(line) lwidth(*3) ciopts(recast(rline) lpattern(dash))	levels(95)	 


	
*************************
*** Figure 5 - main text
*************************

** The visual effect of evangelical churches on voter turnout (A), electoral competition (B), electoral conservatism (C), and electoral polarization (D)

*** To replicate the results ploted in Figure 5 (main text), use the file "df_LPT_igrejas_outcomes.dta"

use "df_LPT_igrejas_outcomes.dta"

****************************
** Outcome: Turnout
****************************


cd "INSERT DIRECTORY PATH HERE" 

**Linear
rdplot turnout light_00 if year >= 2004, c(85) p(1) level(90) ///
     graph_options(title("") ///
     ytitle("(A) turnout",size(medsmall)) /// 
	 xtitle("",size(medsmall)) /// 
	  legend(position(4) cols(1)) ///
	  xline(85, lcolor(red) lpattern(dash) lwidth(medthin))) ///
	  graphregion(color(white)) bgcolor(white) plotregion(margin(zero))
graph save turnout_linear.gph


*** Cubic
rdplot turnout light_00 if year >= 2004, c(85) p(3) level(90) ///
     graph_options(title("") ///
     ytitle("",size(medsmall)) /// 
	 xtitle("",size(medsmall)) /// 
	  legend(position(4) cols(1)) ///
	  xline(85, lcolor(red) lpattern(dash) lwidth(medthin))) ///
	  graphregion(color(white)) bgcolor(white) plotregion(margin(zero))
graph save turnout_cubic.gph



***************************
** Outcome: Competition
***************************


cd "INSERT DIRECTORY PATH HERE" 

**Linear
rdplot comp light_00 if year >= 2004, c(85) p(1) level(90) ///
     graph_options(title("") ///
     ytitle("(B) Competition",size(medsmall)) /// 
	 xtitle("",size(medsmall)) /// 
	  legend(position(4) cols(1)) ///
	  xline(85, lcolor(red) lpattern(dash) lwidth(medthin))) ///
	  graphregion(color(white)) bgcolor(white) plotregion(margin(zero))
graph save comp_linear.gph


*** Cubic
rdplot comp light_00 if year >= 2004, c(85) p(3) level(90) ///
     graph_options(title("") ///
     ytitle("",size(medsmall)) /// 
	 xtitle("",size(medsmall)) /// 
	  legend(position(4) cols(1)) ///
	  xline(85, lcolor(red) lpattern(dash) lwidth(medthin))) ///
	  graphregion(color(white)) bgcolor(white) plotregion(margin(zero))
graph save comp_cubic.gph



***************************
** Outcome: Conservatism
***************************

cd "INSERT DIRECTORY PATH HERE" 


**Linear
rdplot ideo_imp light_00 if year >= 2004, c(85) p(1) level(90) ///
     graph_options(title("") ///
     ytitle("(C) Conservatism",size(medsmall)) /// 
	 xtitle("",size(medsmall)) /// 
	  legend(position(4) cols(1)) ///
	  xline(85, lcolor(red) lpattern(dash) lwidth(medthin))) ///
	  graphregion(color(white)) bgcolor(white) plotregion(margin(zero))
graph save conserv_linear.gph

*** Cubic
rdplot ideo_imp light_00 if year >= 2004, c(85) p(3) level(90) ///
     graph_options(title("") ///
     ytitle("",size(medsmall)) /// 
	 xtitle("",size(medsmall)) /// 
	  legend(position(4) cols(1)) ///
	  xline(85, lcolor(red) lpattern(dash) lwidth(medthin))) ///
	  graphregion(color(white)) bgcolor(white) plotregion(margin(zero))
graph save conserv_cubic.gph


****************************
** Outcome: Polarization
****************************

cd "INSERT DIRECTORY PATH HERE" 

**Linear
rdplot pol_pi light_00 if year >= 2004, c(85) p(1) level(90) ///
     graph_options(title("") ///
     ytitle("(D) Polarization",size(medsmall)) /// 
	 xtitle("",size(medsmall)) /// 
	  legend(position(4) cols(1)) ///
	  xline(85, lcolor(red) lpattern(dash) lwidth(medthin))) ///
	  graphregion(color(white)) bgcolor(white) plotregion(margin(zero))
  graph save pol_linear.gph

*** Cubic
rdplot pol_pi light_00 if year >= 2004, c(85) p(3) level(90) ///
     graph_options(title("") ///
     ytitle("",size(medsmall)) /// 
	 xtitle("",size(medsmall)) /// 
	  legend(position(4) cols(1)) ///
	  xline(85, lcolor(red) lpattern(dash) lwidth(medthin))) ///
	  graphregion(color(white)) bgcolor(white) plotregion(margin(zero))
graph save pol_cubic.gph


** Before combining the plots
*** You should make sure to set the correct directory where the gph figures have been saved
cd "INSERT DIRECTORY PATH HERE"

graph combine turnout_linear.gph turnout_cubic.gph ///
      comp_linear.gph comp_cubic.gph ///
	  conserv_linear.gph conserv_cubic.gph ///
	  pol_linear.gph pol_cubic.gph, ///
	  cols(2) rows (6) xcommon iscale(.5)
	  
graph save combine_reduced_form.gph	  


	  
	  
*****************
*** Figure 6: BW est. (h) sensitiveness of reduced form estimates
*****************
   
  ** The code below returns the estimates used to create the following CSVs:
  
     * bw_sensitiveness_turnout.csv
	 * bw_sensitiveness_competition.csv
	 * bw_sensitiveness_conservatism.csv
	 * bw_sensitiveness_polarization.csv
  
  
** You should use these CSV files in combination with the file "R_plots_psrm" to replicate the Figure 6 as it appears in the main text


*** To replicate the estimates used to create Figure 6 in the main text, use the file "df_LPT_igrejas_outcomes.dta"

use "df_LPT_igrejas_outcomes.dta"

** Outcome: Turnout
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(6.045)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(6.145)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(6.245)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(6.345)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(6.445)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(6.545)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(6.645)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(6.745)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(6.845)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(6.945)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(7.045)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(7.145)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(7.245)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(7.345)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(7.445)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(7.545)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(7.645)
*** Baseline: automatic BW selection
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(7.745)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(7.845)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(7.945)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(8.045)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(8.145)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(8.245)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(8.345)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(8.445)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(8.545)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(8.645)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(8.745)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(8.845)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(8.945)
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) h(9.045)  



** Outcome: competion
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(3.149)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(3.249)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(3.349)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(3.449)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(3.549)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(3.649)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(3.749)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(3.849)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(3.949)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(4.049)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(4.149)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(4.249)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(4.349)
*** Baseline: automatic BW selection
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(4.449)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(4.549)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(4.649)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(4.749)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(4.849)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(4.949)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(5.049)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(5.149)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(5.249)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(5.349)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(5.449)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(5.549)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(5.649)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(5.749)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(5.849)
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(5.949) 
rdrobust comp  margins if year >= 2004, c(0) fuzzy(all_100) h(6.049) 



** Outcome: conservatism
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(2.825)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(2.925)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(3.025)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(3.125)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(3.225)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(3.325)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(3.425)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(3.525)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(3.625)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(3.725)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(3.825)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(3.925)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(4.025)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(4.125)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(4.225)
*** Baseline: automatic BW selection
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(4.325)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(4.425)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(4.525)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(4.625)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(4.725)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(4.825)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(4.925)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(5.025)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(5.125)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(5.225)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(5.325)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(5.425)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(5.525)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(5.625)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(5.725)
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) h(5.825)



** Outcome: polarization
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(5.008)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(5.108)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(5.208)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(5.308)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(5.408)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(5.508)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(5.608)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(5.708)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(5.808)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(5.908)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(6.008)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(6.108)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(6.208)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(6.308)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(6.408)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(6.508)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(6.608)
*** Baseline: automatic BW selection
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(6.708)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(6.808)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(6.908)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(7.008)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(7.108)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(7.208)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(7.308)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(7.408)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(7.508)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(7.608)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(7.708)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(7.808)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(7.908)
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) h(8.008) 


  
	  	  	  

 
 
                 ********************************************************************************	
                       **** Replicating the results reported in the ONLINE APPENDIX	
                 ********************************************************************************

***************
** Appendix A: Distribution of evangelical candidates across political parties
***************

*Table 1: Distribution of evangelical candidates competing in local council elections across political parties (2000-2024)

* To replicate Table 1 reported in the Appendix, use the file "df_comb_cand_vereadores.dta"

use "df_comb_cand_vereadores.dta"

tab SG_PARTIDO pastor_dummy,col

****************
** Appendix B: Testing for manipulation around the cutoff
****************
  * Figure 1: Histogram of the running variable
  
 
 * To replicate Figure 1 reported in the Appendix, use the file "LPT_munic_pretreatmentCov.dta"

use "LPT_munic_pretreatmentCov.dta"

hist margins

  * Figure 2: RD manipulation test plot 
**********************************


* To replicate Figure 2 reported in the Appendix, use the file "LPT_munic_pretreatmentCov.dta"

use "LPT_munic_pretreatmentCov.dta"

** RD manipulation test plot  
** The rddensity command is part of the lpdensity library/package. One should install this package before running the commands below

lpdensity margins
rddensity margins, plot

****************
** Appendix C: Testing for the balance of pretreatment municipal-level covariates
*************** 
 * Table 3: Formal continuity-based analysis for pretreatment covariates (2000)

 * To replicate Table 3 reported in the Appendix, use the file "LPT_munic_pretreatmentCov.dta"

use "LPT_munic_pretreatmentCov.dta"


** Before running models you should:

 * 1. Create an encoding (numeric) version of the state id so that one can cluster the standard errors at the state-level

encode uf, gen(state_id)

 * 2. Then create the variable that express the Local average treatment effect (LATE) around the 85% cutoff

gen late = light_00*treat 

** Political variables
*Voter turnout (local elections, 2000)
reg turnout_00 light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
*Is the elected mayor a member of the PT (1996)
reg pt_elected_96 light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
*Is the elected mayor a member of the PT (2000)
reg pt_elected_00 light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
*Number of voted parties (Local council election, 2000)
reg npvv2000 light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
*Number of parties voted in mayoral elections (2000)
reg npvp2000 light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
*Number of parties voted in state parliament elections (2002)
reg npvde2002 light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
*Number of parties voted in federal parliament elections (2002)
reg npvdf2002 light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
*Number of elected council members (PFL)
reg tveDEM2000  light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
*Number of elected council members (PMDB)
reg tveMDB2000  light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
*Number of elected council members (PPB)
reg tvePP2000 light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
*Number of elected council members (PTB)
reg tvePTB2000 light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
*Number of elected council members (PT)
reg tvePT2000 light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)


** Socio-economic variables
** Fertility rate
reg fectot light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
** Life expectancy
reg espvida light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
** Child mortality
reg mort5 light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
** Human development index (HDI)
reg idhm light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
** Illiteracy rate
reg t_analf18m light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
** Income inequality (measured by Gini Index)
reg gini light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
** Poverty rate
reg pmpob light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
** Unemployment rate
reg t_des  light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
** % of occupations in the formal sector
reg p_formal light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
** Economically active workforce 
reg pea light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
** Income per capita
reg rdpct light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
** Level of urbanization
reg percent_urb_00 light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)
** Population size
reg pop light_00 treat late if light_00 >= 80 & light_00 <= 90, cluster (state_id)


****************
*** Appendix D: descriptive statistics
****************

  ** Table 4: Descriptive statistics - pretreatment municipal-level data
 
  * To replicate Table 4 reported in the Appendix, use the file "LPT_munic_pretreatmentCov.dta"

use "LPT_munic_pretreatmentCov.dta"

su turnout_00 npvv2000 npvp2000 npvde2002 npvdf2002 tveDEM2000 tveMDB2000 tvePP2000 tvePTB2000 tvePT2000 pt_elected_96 pt_elected_00 fectot espvida mort5 idhm t_analf18m gini pmpob t_des p_formal pea rdpct percent_urb_00
 
  ** Table 5: Descriptive statistics - municipal-level panel data (1994-2018)
  * To replicate Table 5 reported in the Appendix, use the file "df_LPT_igrejas_outcomes.dta"

use "df_LPT_igrejas_outcomes.dta"  
  
su turnout comp ideo_imp pol_pi share_votes idhm pop ativas_all all_100

****************
*** Appendix E: Measurement validity check: the estimated share of Christian evangelicals using census data 
**************** 
 *Figure 3: Correlation between the estimated shared of Christian evangelicals and the number of evangelical churches per 100,000 inhabitants (2000-2018)

 * To replicate Figure 3 reported in the Appendix, use the file "df_measures_validation.dta"

use "df_measures_validation.dta"
			
twoway scatter share_evang evang_churchers100 || lfit share_evang evang_churchers100 if year >= 2000 & year <=2010, ///
    xtitle("Evangelical churches per 100.000 inhabitants") ytitle("Estimated share of Christian evangelicals") subtitle("2000-2010")
	graph save churches_shareevang_2000_2010.gph 									  
		
twoway scatter share_evang evang_churchers100 || lfit share_evang evang_churchers100 if year >= 2010 & year <=2018, ///
    xtitle("Evangelical churches per 100.000 inhabitants") ytitle("Estimated share of Christian evangelicals")	subtitle("2012-2018") 
	graph save churches_shareevang_2010_2018.gph 				
			
** Once again, please make sure to set the correct directory where the gph figures have been saved
cd "INSERT DIRECTORY PATH HERE"

graph combine churches_shareevang_2000_2010.gph churches_shareevang_2010_2018.gph, cols(2)

**************
*** Appendix F: Fixed effects models using the estimated share of Christian evangelicals 
**************
   
  * Table 6: Correlation between the share of Christian evangelicals and a set of electoral outcomes (2000-2018)

  * To replicate estimates reported in Table 6 (Appendix), please use the following dataset: df_LPT_share_evangs.dta
 
use "df_LPT_share_evangs.dta"


** Before running the OLS models, you should run the code below to create key variables used in the statistical analysis

*************************************************************************
**** Transforming/creating key variables used in the statistical analysis
*************************************************************************

*** creating the log of the size of population
gen ln_pop = ln(pop)
** creating the log of the size of electorate
gen ln_elec = ln(qtde_eleitores)

  
** Municipal and year-level fixed effects models (FE)

*** Full sample (All)
xtset ibge7
** Outcome: Turnout 
xtreg turnout share_evang IDHM ln_pop ln_elec, fe cluster (cod_uf)
** Outcome: Competition
xtreg comp share_evang IDHM ln_pop ln_elec, fe cluster (cod_uf)
** Outcome: Conservatism
xtreg ideo_imp share_evang IDHM ln_pop ln_elec, fe cluster (cod_uf)
** Outcome: Polarization
xtreg pol_pi share_evang IDHM ln_pop ln_elec, fe cluster (cod_uf)

      
*** National elections
** Outcome: Turnout 
xtreg turnout share_evang IDHM ln_pop ln_elec if national ==1, fe cluster (cod_uf)
** Outcome: Competition
xtreg comp share_evang IDHM ln_pop ln_elec if national ==1, fe cluster (cod_uf)
** Outcome: Conservatism
xtreg ideo_imp share_evang IDHM ln_pop ln_elec if national ==1, fe cluster (cod_uf)
** Outcome: Polarization
xtreg pol_pi share_evang IDHM ln_pop ln_elec if national ==1, fe cluster (cod_uf)


*** Local elections
** Outcome: Turnout 
xtreg turnout share_evang IDHM ln_pop ln_elec if national ==0, fe cluster (cod_uf)
** Outcome: Competition
xtreg comp share_evang IDHM ln_pop ln_elec if national ==0, fe cluster (cod_uf)
** Outcome: Conservatism
xtreg ideo_imp share_evang IDHM ln_pop ln_elec if national ==0, fe cluster (cod_uf)
** Outcome: Polarization
xtreg pol_pi share_evang IDHM ln_pop ln_elec if national ==0, fe cluster (cod_uf)


 

****************
*** Appendix G: Fixed effects models testing for heterogeneous effects by time 
****************
 
 * Table 7: Heterogeneous effects by time: Correlation between the share of Christian evangelicals and a set of electoral outcomes (1994-2018)
 
 * To replicate estimates reported in Table 7 (Appendix), use the file "df_LPT_igrejas_outcomes.dta"

use "df_LPT_igrejas_outcomes.dta"


** Before running the OLS models, you should run the code below to create key variables used in the statistical analysis

*************************************************************************
**** Transforming/creating key variables used in the statistical analysis
*************************************************************************

*** creating the log of the size of population
gen ln_pop = ln(pop)
** creating the log of the size of electorate
gen ln_elec = ln(qtde_eleitores)


** Outcome: Turnout
xtset ibge7 year
xtreg turnout all_100 idhm ln_pop ln_elec if year >= 1994 & year <= 2000, fe cluster (cod_uf)
xtreg turnout all_100 idhm ln_pop ln_elec if year >= 2002 & year <= 2010, fe cluster (cod_uf)
xtreg turnout all_100 idhm ln_pop ln_elec if year >= 2012 & year <= 2018, fe cluster (cod_uf)

** Outcome: Competition
xtset ibge7 year
xtreg comp all_100 idhm ln_pop ln_elec if year >= 1994 & year <= 2000, fe cluster (cod_uf)
xtreg comp all_100 idhm ln_pop ln_elec if year >= 2002 & year <= 2010, fe cluster (cod_uf)
xtreg comp all_100 idhm ln_pop ln_elec if year >= 2012 & year <= 2018, fe cluster (cod_uf)

** Outcome: Conservatism
xtset ibge7 year
xtreg ideo_imp all_100 idhm ln_pop ln_elec if year >= 1994 & year <= 2000, fe cluster (cod_uf)
xtreg ideo_imp all_100 idhm ln_pop ln_elec if year >= 2002 & year <= 2010, fe cluster (cod_uf)
xtreg ideo_imp all_100 idhm ln_pop ln_elec if year >= 2012 & year <= 2018, fe cluster (cod_uf)


** Outcome: Polarization
xtset ibge7 year
xtreg pol_pi all_100 idhm ln_pop ln_elec if year >= 1994 & year <= 2000, fe cluster (cod_uf)
xtreg pol_pi all_100 idhm ln_pop ln_elec if year >= 2002 & year <= 2010, fe cluster (cod_uf)
xtreg pol_pi all_100 idhm ln_pop ln_elec if year >= 2012 & year <= 2018, fe cluster (cod_uf)

****************
*** Appendix H: Using the Worker's Party (PT) share of votes as an alternative measure of conservatism 
****************

* Table 8: Correlation between the number of evangelical churches per 100,000 inhabitants and a set of electoral outcomes (1994-2018)

*** To replicate estimates reported in Table 8 (Appendix), use the file "df_LPT_igrejas_outcomes.dta"

use "df_LPT_igrejas_outcomes.dta"

** Before running the OLS models, you should run the code below to create key variables used in the statistical analysis

*************************************************************************
**** Transforming/creating key variables used in the statistical analysis
*************************************************************************

*** creating the log of the size of population
gen ln_pop = ln(pop)
** creating the log of the size of electorate
gen ln_elec = ln(qtde_eleitores)
  
** Municipal and year-level fixed effects models (FE)

*** Full sample (All)
xtset ibge7 year
** Outcome: Turnout
xtreg turnout all_100 idhm ln_pop ln_elec, fe cluster (cod_uf) 
** Outcome: Competition
xtreg comp all_100 idhm ln_pop ln_elec, fe cluster (cod_uf)
** Outcome: Conservatism
xtreg ideo_imp all_100 idhm ln_pop ln_elec, fe cluster (cod_uf)
** Outcome: Polarization
xtreg pol_pi all_100 idhm ln_pop ln_elec, fe cluster (cod_uf)
** Outcome: Worker's Party (PT's) vote share
xtreg share_votes all_100 idhm ln_pop ln_elec, fe cluster (cod_uf)


    
*** National elections
** Outcome: Turnout
xtreg turnout all_100 idhm ln_pop ln_elec if national ==1, fe cluster (cod_uf)
** Outcome: Competition
xtreg comp all_100 idhm ln_pop ln_elec if national ==1, fe cluster (cod_uf)
** Outcome: Conservatism
xtreg ideo_imp all_100 idhm ln_pop ln_elec if national ==1, fe cluster (cod_uf)
** Outcome: Polarization
xtreg pol_pi all_100 idhm ln_pop ln_elec if national ==1, fe cluster (cod_uf)
** Outcome: Worker's Party (PT's) vote share
xtreg share_votes all_100 idhm ln_pop ln_elec if national ==1, fe cluster (cod_uf)
    
*** Local elections
** Outcome: Turnout
xtreg turnout all_100 idhm ln_pop if national ==0, fe cluster (cod_uf)
** Outcome: Competition
xtreg comp all_100 idhm ln_pop if national ==0, fe cluster (cod_uf)
** Outcome: Conservatism
xtreg ideo_imp all_100 idhm ln_pop if national ==0, fe cluster (cod_uf)
** Outcome: Polarization
xtreg pol_pi all_100 idhm ln_pop if national ==0, fe cluster (cod_uf)
** Outcome: Worker's Party (PT's) vote share
xtreg share_votes all_100 idhm ln_pop if national ==0, fe cluster (cod_uf)




* Table 9: The impact of evangelical churches on electoral politics (2004-2018)

*** To replicate estimates reported in Table 9 (Appendix), use the file "df_LPT_igrejas_outcomes.dta"

use "df_LPT_igrejas_outcomes.dta"

 
*** Fuzzy regression discontinuity models (USING a linear FIT)


** Running these estimates requires the STATA package rdrobust. If you haven't yet, you can install this package by using the line code below: 
    * net install rdrobust, from(https://raw.githubusercontent.com/rdpackages/rdrobust/master/stata) replace
	* Visit https://rdpackages.github.io/rdrobust/ to further information on this package

***** Full sample (All)  
** Outcome: Turnout
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) all
** Outcome: Competition
rdrobust comp margins if year >= 2004, c(0) fuzzy(all_100) all 
** Outcome: Conservatism
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) all
** Outcome: Polarization
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) all
** Outcome: Worker's Party (PT's) vote share
rdrobust share_votes margins if year >= 2004, c(0) fuzzy(all_100) all


***** National elections 
** Outcome: Turnout
rdrobust turnout margins if year >= 2004 & national ==1, c(0)  fuzzy(all_100) all
** Outcome: Competition
rdrobust comp margins if year >= 2004 & national ==1, c(0) fuzzy(all_100) all
** Outcome: Conservatism
rdrobust ideo_imp margins if year >= 2004 & national ==1, c(0) fuzzy(all_100) all
** Outcome: Polarization
rdrobust pol_pi margins if year >= 2004 & national ==1, c(0) fuzzy(all_100) all
** Outcome: Worker's Party (PT's) vote share
rdrobust share_votes margins if year >= 2004 & national ==1, c(0) fuzzy(all_100) all


***** Local elections 
** Outcome: Turnout
rdrobust turnout margins if year >= 2004 & national ==0, c(0)  fuzzy(all_100) all
** Outcome: Competition
rdrobust comp margins if year >= 2004 & national ==0, c(0) fuzzy(all_100) all
** Outcome: Conservatism
rdrobust ideo_imp margins if year >= 2004 & national ==0, c(0) fuzzy(all_100) all
** Outcome: Polarization
rdrobust pol_pi margins if year >= 2004 & national ==0, c(0) fuzzy(all_100) all
** Outcome: Worker's Party (PT's) vote share
rdrobust share_votes margins if year >= 2004 & national ==0, c(0) fuzzy(all_100) all




****************
*** Appendix I: First-stage and reduced form placebo estimates 
****************

* Table 10: The impact of evangelical churches on electoral politics - Placebo estimates using pre-intervention (LPT) data (1994- 2003)

* To replicate estimates reported in Table 10 (Appendix), use the file "df_LPT_igrejas_outcomes.dta"


use "df_LPT_igrejas_outcomes.dta"

** Full sample (All)
** Outcome: Turnout
rdrobust turnout margins if year < 2004, c(0) fuzzy(all_100) all
** Outcome: Competition
rdrobust comp margins if year < 2004, c(0) fuzzy(all_100) all 
** Outcome: Conservatism
rdrobust ideo_imp margins if year < 2004, c(0) fuzzy(all_100) all
** Outcome: Polarization
rdrobust pol_pi margins if year < 2004, c(0) fuzzy(all_100) all

** National elections 
** Outcome: Turnout
rdrobust turnout margins if year < 2004 & national ==1, c(0)  fuzzy(all_100) all
** Outcome: Competition
rdrobust comp margins if year < 2004 & national ==1, c(0) fuzzy(all_100) all
** Outcome: Conservatism
rdrobust ideo_imp margins if year < 2004 & national ==1, c(0) fuzzy(all_100) all
** Outcome: Polarization
rdrobust pol_pi margins if year < 2004 & national ==1, c(0) fuzzy(all_100) all

** Local elections 
** Outcome: Turnout
rdrobust turnout margins if year < 2004 & national ==0, c(0)  fuzzy(all_100) all
** Outcome: Competition
rdrobust comp margins if year < 2004 & national ==0, c(0) fuzzy(all_100) all
** Outcome: Conservatism
rdrobust ideo_imp margins if year < 2004 & national ==0, c(0) fuzzy(all_100) all
** Outcome: Polarization
rdrobust pol_pi margins if year < 2004 & national ==0, c(0) fuzzy(all_100) all


****************
*** Appendix J: The impact of the LPT and the expansion of the Evangelical Christianity 
****************

 * Table 11: The impact of the LPT on the estimated share of Christian evangelicals
 
 * To replicate estimates reported in Table 11 (Appendix), please use the following dataset: df_LPT_share_evangs.dta
 
use "df_LPT_share_evangs.dta" 

*** creating the log of the size of population
gen ln_pop = ln(pop)
** creating the log of the size of electorate
gen ln_elec = ln(qtde_eleitores)
** creating a dummy variable that identifies whether a given municipality if located at the Northeast region in Brazil
gen ne=.
replace ne = 1 if cod_uf == 21
replace ne = 1 if cod_uf == 22
replace ne = 1 if cod_uf == 23
replace ne = 1 if cod_uf == 24
replace ne = 1 if cod_uf == 25
replace ne = 1 if cod_uf == 26
replace ne = 1 if cod_uf == 27
replace ne = 1 if cod_uf == 28
replace ne = 1 if cod_uf == 29
replace ne = 0 if ne ==.


*** creating the log of LPT connections per 100,000 inhabitants
gen ln_lptconnections100 = ln(conec_100)

** Municipal-level fixed effects
xtset ibge7
xtreg share_evang ln_lptconnections100 ln_pop IDHM ne if year > 2004, cluster (ibge7) 
** Intention to treat (ITT)
reg share_evang treat ln_pop IDHM ne if year > 2004, cluster (ibge7) 	
** SRD
gen srd = margins*treat
** BW (+-15% from the LPT cutoff)
reg share_evang treat margins srd ln_pop IDHM ne if light_00 > 70 & light_00 < 100 & year > 2004, robust
** BW (+-10% from the LPT cutoff)
reg share_evang treat margins srd ln_pop IDHM ne if light_00 > 75 & light_00 < 95 & year > 2004, robust
** BW (+-7% from the LPT cutoff)
reg share_evang treat margins srd ln_pop IDHM ne if light_00 > 78 & light_00 < 92 & year > 2004, robust
** BW (+-3% from the LPT cutoff)
reg share_evang treat margins srd ln_pop IDHM ne if light_00 > 82 & light_00 < 88 & year > 2004, robust
** BW (+-2% from the LPT cutoff)
reg share_evang treat margins srd ln_pop IDHM ne if light_00 > 83 & light_00 < 87 & year > 2004, robust
** BW (+-1% from the LPT cutoff)
reg share_evang treat margins srd ln_pop IDHM ne if light_00 > 84 & light_00 < 86 & year > 2004, robust


****************
*** Appendix K: First-stage and reduced form estimates using the estimated share of Christian
****************
 
** Table 12: The impact of evangelical churches on electoral politics (2004-2018)

* To replicate estimates reported in Table 12 (Appendix), please use the following dataset: df_LPT_share_evangs.dta
 
use "df_LPT_share_evangs.dta" 


***** Full sample (All)  
** Outcome: Turnout
rdrobust turnout margins if year >= 2004, c(0) fuzzy(share_evang) all
** Outcome: Competition
rdrobust comp margins if year >= 2004, c(0) fuzzy(share_evang) all 
** Outcome: Conservatism
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(share_evang) all
** Outcome: Polarization
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(share_evang) all


***** National elections 
** Outcome: Turnout
rdrobust turnout margins if year >= 2004 & national ==1, c(0)  fuzzy(share_evang) all
** Outcome: Competition
rdrobust comp margins if year >= 2004 & national ==1, c(0) fuzzy(share_evang) all
** Outcome: Conservatism
rdrobust ideo_imp margins if year >= 2004 & national ==1, c(0) fuzzy(share_evang) all
** Outcome: Polarization
rdrobust pol_pi margins if year >= 2004 & national ==1, c(0) fuzzy(share_evang) all


***** Local elections 
** Outcome: Turnout
rdrobust turnout margins if year >= 2004 & national ==0, c(0)  fuzzy(share_evang) all
** Outcome: Competition
rdrobust comp margins if year >= 2004 & national ==0, c(0) fuzzy(share_evang) all
** Outcome: Conservatism
rdrobust ideo_imp margins if year >= 2004 & national ==0, c(0) fuzzy(share_evang) all
** Outcome: Polarization
rdrobust pol_pi margins if year >= 2004 & national ==0, c(0) fuzzy(share_evang) all


****************
*** Appendix L: Testing for the rise of other religious groups around the LPT cutoff 
**************** 
 
 * Table 13: The impact of LPT on the number of non-evangelical religious facilities (A); and the impact of non-evangelical religious facilities on electoral outcomes (B)

* To replicate estimates reported in Table 13 (Appendix), use the file "df_LPT_igrejas_placebo_religious_group.dta"


use "df_LPT_igrejas_placebo_religious_group.dta"

***** Full sample (All)  
** Outcome: Turnout
rdrobust turnout margins if year >= 2004, c(0) fuzzy(all_100) all
** Outcome: Competition
rdrobust comp margins if year >= 2004, c(0) fuzzy(all_100) all 
** Outcome: Conservatism
rdrobust ideo_imp margins if year >= 2004, c(0) fuzzy(all_100) all
** Outcome: Polarization
rdrobust pol_pi margins if year >= 2004, c(0) fuzzy(all_100) all


***** National elections 
** Outcome: Turnout
rdrobust turnout margins if year >= 2004 & national ==1, c(0)  fuzzy(all_100) all
** Outcome: Competition
rdrobust comp margins if year >= 2004 & national ==1, c(0) fuzzy(all_100) all
** Outcome: Conservatism
rdrobust ideo_imp margins if year >= 2004 & national ==1, c(0) fuzzy(all_100) all
** Outcome: Polarization
rdrobust pol_pi margins if year >= 2004 & national ==1, c(0) fuzzy(all_100) all


***** Local elections 
** Outcome: Turnout
rdrobust turnout margins if year >= 2004 & national ==0, c(0)  fuzzy(all_100) all
** Outcome: Competition
rdrobust comp margins if year >= 2004 & national ==0, c(0) fuzzy(all_100) all
** Outcome: Conservatism
rdrobust ideo_imp margins if year >= 2004 & national ==0, c(0) fuzzy(all_100) all
** Outcome: Polarization
rdrobust pol_pi margins if year >= 2004 & national ==0, c(0) fuzzy(all_100) all
















 
 

 
 


  
  
  
  
  
  







 



 


			
			
			






	  

  
	  
	  
	  
	  
	  
	  



	  
	  
	  
	  
	  
	  
	  
	  
	  


							
							
							











